﻿/*  ----------------------------------------------------------------------------
 *  SysServer
 *  ----------------------------------------------------------------------------
 *  File:       NetMessage.cs
 *  Creater:     SEEN\MistSeen
 *  ----------------------------------------------------------------------------
 *  $Date: 2010-09-06 10:36:01 +0000 (Mon, 06 Sep 2010) $
 *  $Rev: 15 $
 *  $Author: ScorDeity $
 *  $URL: http://sysserver.googlecode.com/svn/trunk/src/SysServer/NetWrok/NetMessage.cs $
 *  $Id: NetMessage.cs 15 2010-09-06 10:36:01Z ScorDeity $
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SysServer.NetWrok
{
    [Serializable]
    public abstract class NetMessage : IDataProtocol
    {
        /// <summary>
        /// 消息头
        /// </summary>
        public IMessageHeader Header = null;
        /// <summary>
        /// 可以经过压缩、变换Hook
        /// </summary>
        public byte[] Body = null;
        /// <summary>
        /// 用于在将交换时传递额外的信息，不会被Stream
        /// </summary>
        public object Tag = null;

        public NetMessage()
        {
        }

        public NetMessage(IMessageHeader header, Byte[] body)
        {
            this.Header = header;
            this.Body = body;
        }

      
    }
}